<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 表单 -->
        <!-- 数据的双向绑定 -->
        <h1>{{msg}}</h1>
        <form @submit.prevent="post">
            <!-- <input type="text" v-model="msg"> -->
            <!-- <input type="text" v-model.number="msg"> -->
            <!-- <input type="text" v-model.lazy="msg"> -->
            <input type="text" v-model.trim="msg">
            <!-- <button>提交表单</button> -->
			<input type="submit" />
        </form>
    </div>

    <script src="https://unpkg.com/vue@next"></script>
    <script>
        Vue.createApp({
            data(){
                return {
                    msg:""
                }
            },
            methods:{
                post(){
                    console.log(this.msg)
                }
            }
        }).mount("#app")
    </script>
</body>
</html>